#include <iostream>
using namespace std;

int main (void)
{
	string str;
	int cnt = 0;
	cout << "please input a string:" << endl;
	//cin >> str;
	getline (cin, str);
	for (int i = 0; i < str.size(); i++) {
		if (str[i] == 'A' || str[i] == 'a') {
			cnt++;
		}
	}
	cout << cnt << endl;
	return 0;
}
